package org.dingfugui.triple.core.util;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

/**
 * Created by fugui.ding on 2015/3/31.
 */
public class ReflectUtil {

    public static Object invokeMethod(Object obj, String method, Class[] types, Object[] param) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        Class cls = obj.getClass();
        Method m = cls.getDeclaredMethod(method, types);
        return m.invoke(obj, param);
    }

}
